import { Graph } from "@antv/x6";
import * as FlowGraph from "../../core/create";
import InfoGraph from "./InfoGraph.vue";
import { PORTS } from "../../default";
import { CustomGraphType } from "../type";

Graph.registerNode("InfoGraph", {
	inherit: "vue-shape",
	width: 70,
	height: 30,
	component: {
		template: `<InfoGraph />`,
		components: { InfoGraph }
	},
	ports: PORTS,
	data: {
		type: CustomGraphType.INFO,
		vue: true
	}
});

FlowGraph.install(CustomGraphType.INFO, ({ graph, appendStencil }) => {
	appendStencil([graph.createNode({ shape: "InfoGraph" })]);
});
